package com.ibm.cloud.banking.config;

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.engine.DefaultManagementNameStrategy;
import org.apache.camel.saga.InMemorySagaService;
import org.springframework.context.annotation.Configuration;

/**
 * replace desc in here
 *
 * @author HanDong
 * @date 2022/7/15
 */
@Configuration
public class SagaConfig extends RouteBuilder {

    /**
     * 内存协调器/生产环境不可使用
     */
    @Override
    public void configure() throws Exception {
        getContext().setManagementNameStrategy(new DefaultManagementNameStrategy(getContext()));
        getContext().addService(new InMemorySagaService());
    }
}
